home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Freeware
/
First Page 2006 3.00
/
fp2006-final-3.00-setup.exe
/
{app}
/
Iscripts
/
Form & Validation
/
char-count.izs
< prev
next >
Wrap
Text File
|
2005-08-29
|
2KB
|
79 lines
<!NOWIZARD>
<!TITLE>Character count
<!/TITLE>
<!DESCRIPTION>Calculate and display the number of characters within a TEXTAREA with this script. Useful, for example, in helping your visitors manually keep their input length in check!
<!/DESCRIPTION>
<!CATEGORY>form and form validation<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<form method="POST">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<textarea rows="12" name="charcount" cols="60" wrap="virtual"></textarea>
</td>
</tr>
<tr>
<td width="100%"><div align="right"><p><input type="button" value="Calculate Characters"
onClick="countit(this)"> <input type="text" name="displaycount" size="20"></p>
<div align="center"><center><p><font face="arial" size="-2">This free script provided by</font>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>
</center></div></div></td>
</tr>
</table>
</form>
<script language="JavaScript">
function countit(what){
formcontent=what.form.charcount.value
what.form.displaycount.value=formcontent.length
}
</script>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<form method="POST">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<textarea rows="12" name="charcount" cols="60" wrap="virtual"></textarea>
</td>
</tr>
<tr>
<td width="100%"><div align="right"><p><input type="button" value="Calculate Characters"
onClick="countit(this)"> <input type="text" name="displaycount" size="20"></p>
<div align="center"><center><p><font face="arial" size="-2">This free script provided by</font>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>
</center></div></div></td>
</tr>
</table>
</form>
<script language="JavaScript">
function countit(what){
formcontent=what.form.charcount.value
what.form.displaycount.value=formcontent.length
}
</script>
<!-- END OF SCRIPT -->
<!/PREVIEW>
<!RELATED>NONE<!/RELATED>